var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, n, o) {
    var r, i = arguments.length, c = i < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, n) : o;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(t, e, n, o); else for (var a = t.length - 1; 0 <= a; a--) (r = t[a]) && (c = (i < 3 ? r(c) : 3 < i ? r(e, n, c) : r(e, n)) || c);
    return 3 < i && c && Object.defineProperty(e, n, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("UIManager"), s = e("BaseView"), c = e("PopItemView"), l = cc._decorator, d = l.ccclass, u = (l.property, 
function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.pnl = "", t.data = null, t;
    }
    return i(t, e), t.prototype.onDisable = function() {
        this.node.destroy();
    }, t.prototype.onDestroy = function() {
        r.default.getInstance().releasePnl(this.text);
    }, t.prototype.start = function() {}, t.prototype.init = function() {
        var e = this;
        r.default.getInstance().loadPnl(this.pnl, this.node).then(function(t) {
            e.initItem(t) || e.hidePnl();
        });
    }, t.prototype.initItem = function(t) {
        if (t instanceof s.default) {
            t = t.getComponent(c.default);
            if (t) return t.root = this, t.text = this.pnl, t.init(), !0;
        }
        return !1;
    }, a([ d ], t);
}(s.default));

n.default = u;